/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ing.sisval.gui.control.model;



import org.ing.sisval.be.BEPersona;
import org.rx.cr.gui.table.AbstractTableModel;
import org.rx.cr.util.Utilitarios;

/**
 *
 * @author Mysham
 */
public class ModelPersona extends AbstractTableModel<BEPersona>{

    public ModelPersona() {
        setTitles(new String[] {"Persona","DNI"});
    }

    @Override
    public Object getObjectCell(int fila, int columna) {
        switch(columna){
            
            case 0: return get(fila).getAppaterno().toUpperCase()+" "+ get(fila).getApmaterno().toUpperCase()+", "
                    + Utilitarios.toUpperCaseInit(get(fila).getNombres());
            case 1: return get(fila).getDni();
            
                default: return null;
        }
    }
    
    
}
